import { getWebCastUrl } from '../../../api/webCast'
Page({
  data: {
    link: ''
  },

  onLoad: function (options) {
    console.log(options)
    this.init(options.activityId)
  },

  init(id) {
    getWebCastUrl(id).then(res => {
      this.setData({
        link: res
      })
    })
  },

  back() {
    wx.navigateBack({
      delta: 1
    })
  },

  toPageMessage: function() {
    wx.navigateTo({ url: '/packageA/pages/message/message' })
  }
})
